<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/Tecnico/template.xhtml">
	<ui:define name="conteudo">
		<p:messages/>
		<h:panelGrid columns="2" cellpadding="10">
		
		<p:dataTable value="#{controladorReserva.todasReservas}" var="reserva">
			
			<p:column>
				<f:facet name="header"><h:outputText value="#{msg['reserva.usuario.nome']}"/></f:facet>
					<h:outputText value="#{reserva.usuario.nome}">
					</h:outputText>
			</p:column>
				
			<p:column>
				<f:facet name="header"><h:outputText value="#{msg['reserva.recurso.nome']}"/></f:facet>
					<h:outputText value="#{reserva.recurso.nome}">	
					</h:outputText>
			</p:column>
				
			<p:column>
				<f:facet name="header"><h:outputText value="#{msg['reserva.data']}"/></f:facet>
					<h:outputText value="#{reserva.data}" >
						<f:convertDateTime pattern="d/M/yyyy"/>
					</h:outputText>
			</p:column>
			
			<p:column>
				<f:facet name="header"><h:outputText value="#{msg['reserva.horario.inicio']}" /></f:facet>
				<h:outputText value="#{reserva.horarioInicio}">
					<f:convertDateTime pattern="HH:mm" />
]				</h:outputText>
			</p:column>
			
			<p:column>
				<f:facet name="header"><h:outputText value="#{msg['reserva.horario.fim']}"/></f:facet>
				<h:outputText value="#{reserva.horarioFim}">
					<f:convertDateTime pattern="HH:mm" />
				</h:outputText>
			</p:column>
			
			<p:column>
				<f:facet name="header"><h:outputText value="#{msg['reserva.status']}" /></f:facet>
				<h:outputText value="#{reserva.status}">
				</h:outputText>
			</p:column>	
			
			<p:column>
			<f:facet name="header"><h:outputText value="#{msg['menu.deletar.reserva']}"/></f:facet>			
				<h:commandLink action="#{controladorReserva.deletarReserva}">
					<h:graphicImage library="imagens" name="delete.gif"/>
					<f:setPropertyActionListener value="#{reserva}" target="#{controladorReserva.reserva}"/>
				</h:commandLink>					
			</p:column>	
			
			<p:column>
				<f:facet name="header"><h:outputText value="#{msg['reserva.quantidade']}"/></f:facet>
					<h:outputText value="#{reserva.recurso.quantidade}">
					</h:outputText>
			</p:column>
			
		</p:dataTable>
		</h:panelGrid>
		<p:commandButton ajax="false" value="#{msg['botao.voltar']}" action="/Tecnico/homeTecnico.xhtml"/>
</ui:define>
</ui:composition>


</html>
